package org.example.admin.common.enums.errorEnum;

import org.example.admin.common.convention.errorcode.IErrorCode;

/**
 * 用户相关错误异常码定义
 *
 * @author weibin
 * @since 2025/10/3 20:06
 */
public enum UserErrorCodeEnum implements IErrorCode {

    USER_TOKEN_FAIL("A000000", "用户token失效或不存在"),
    USER_NULL("A000100", "用户不存在"),
    USER_NAME_EXIST("A000101", "用户名已存在"),
    USER_EXIST("A000102", "用户已存在"),
    USER_SAVE_ERROR("A000103", "用户保存失败"),

    USER_LOGIN_ERROR("A000200", "用户登录失败"),
    USER_LOGIN_HAS_LOGIN("A000201", "用户已登录"),
    USER_LOGIN_NOT_LOGIN("A000202", "用户未登录"),

    ;

    private final String code;
    private final String message;

    UserErrorCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
